package cn.hh.wechatkit.pojo.message.imp.commumication;

import cn.hh.wechatkit.pojo.message.imp.Wx_BaseMsg;

import java.util.Map;

/**
 * Created this one by HMH on 2017/7/11.
 */
public class Wx_LinkMsg  extends Wx_BaseMsg{

    private String title;
    private String description;
    private String url;

    public Wx_LinkMsg(Map<String, String> map) {
        super(map);
        this.title = map.getOrDefault("Title", "");
        this.description = map.getOrDefault("Description", "");
        this.url = map.getOrDefault("Url", "");
    }

    public String MsgToXml() {
        return null;
    }

    private String MsgTemplate = "<xml>\n" +
            "<ToUserName><![CDATA[{ToUserName}]]></ToUserName>\n" +
            "<FromUserName><![CDATA[{FromUserName}]]></FromUserName>\n" +
            "<CreateTime>{CreateTime}</CreateTime>\n" +
            "<MsgType><![CDATA[{MsgType}]]></MsgType>\n" +
            "<Title><![CDATA[{Title}]]></Title>\n" +
            "<Description><![CDATA[{Description}]]></Description>\n" +
            "<Url><![CDATA[{Url}]]></Url>\n" +
            "<MsgId>{MsgId}</MsgId>\n" +
            "</xml>";
}
